<template>
	<view class="main">  
	  <image class="img" mode="aspectFill" src="@/static/er.png"/>
	  <view class="txt-b">申请获取以下权限</view>
	  <view class="txt-m">获得你的公开信息(昵称、头像等)</view>
	  <button class="btn" @click="login">授权登录</button>
	  <button class="btn2" @click="cancel">拒绝</button>
	</view>
</template>

<script>
	var app = getApp();
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			login(){
				app.login(function(res){
					console.log(res)
				})
			},
			cancel(){
				uni.switchTab({
					url:"/pages/index/index"
				})
			}
		}
	}
</script>

<style>
.main{
  margin:100rpx;
  display: flex;
  flex-direction: column;
}
.img{
  width:200rpx;
  height: 200rpx;  
  margin: 0 auto;   
}
.txt-b{
  margin-top:50rpx;
  padding-top:50rpx;
  font-size: 38rpx;
  border-top: solid 1rpx #e1e1e1;
}
.txt-m{
  margin-top:40rpx;  
  font-size: 30rpx;  
  color: #828282;
}
.btn{
  margin-top:50rpx;
  width:100%;  
  border-radius: 60rpx;
  background-color: #57b816;
  color: #ffffff;
  border: none;
}
.btn2{
  margin-top:50rpx;
  width:100%;  
  border-radius: 60rpx;
  background-color: #b6bcaa;
  color: #ffffff;
  border: none;
}
</style>
